local xiongzhi = fk.CreateSkill{
  name = "gai__xiongzhi",
  tags = { Skill.Limited },
}

Fk:loadTranslationTable{
  ["gai__xiongzhi"] = "雄志",
  [":gai__xiongzhi"] = "限定技，出牌阶段，你可以观看牌堆顶的牌并使用之，重复至不能被使用。",

  ["#gai__xiongzhi"] = "雄志：你可以重复展示牌堆顶牌并使用之",
  ["#gai__xiongzhi-use"] = "雄志：你可以使用这张牌",

  ["$gai__xiongzhi1"] = "鹰扬千里，明察秋毫。",
  ["$gai__xiongzhi2"] = "鸢飞戾天，目入百川。",
}

xiongzhi:addEffect("active", {
  anim_type = "offensive",
  prompt = "#gai__xiongzhi",
  card_num = 0,
  card_filter = Util.FalseFunc,
  target_num = 0,
  can_use = function(self, player)
    return player:usedSkillTimes(xiongzhi.name, Player.HistoryGame) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    while not player.dead do
      local cards = room:getNCards(1)
      if not room:askToUseRealCard(player, {
        pattern = cards,
        skill_name = xiongzhi.name,
        prompt = "#xiongzhi-use",
        extra_data = {
          bypass_times = true,
          extraUse = false,
          expand_pile = cards,
        }
      }) then
        break
      end
    end
  end,
})

return xiongzhi
